﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BLL.EntitiesBLL
{
    public class PhieuthuBLL
    {
        /// <summary>
        /// Mã tự sinh
        /// </summary>
        /// <param name="id"></param>
        /// <returns> id++ </returns>
        public string AddID(string id)
        {
            try
            {
                string s = id.Trim();

                int len = s.Length;
                string con = s.Substring(2);
                string kq = s.Substring(0, 2);
                int so = Convert.ToInt32(con) + 1;
                if (so <= 9)
                    kq += '0';
                kq += so;

                return kq;
            }
            catch
            {
                return null;
            }
        }
    }
}
